#pragma once

#include <list>
#include "ITask.h"
#include "Singleton.h"
#include "Pointer.h"

class TaskManager : public Singleton<TaskManager>
{
public:
	typedef std::list<Pointer<ITask>> TaskList_t;

	int Execute();
	bool AddTask( Pointer<ITask>& t );
	void SuspendTask( Pointer<ITask>& t );
	void ResumeTask( Pointer<ITask>& t );
	void RemoveTask( Pointer<ITask>& t );
	void KillAllTasks();
protected:
	TaskList_t m_taskList;
	TaskList_t m_pausedTaskList;
};
